﻿using BBCore.Core.Models.EnumTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;

namespace BBCore.Core.Models.BaseModels
{
    /// <summary>
    /// 动态组件控制详细类,包括Type,Label,IsRequired等信息
    /// </summary>
    [Table(Name = "HYJ_ControlDetails")]
    [Description("动态组件控制详细类")]
    public class ControlDetails
    {
        [Column(IsIdentity = true)]
        public int Id { get; set; }
        [Display(Name = "Menu_AuthId")]
        public int Menu_AuthId { get; set; }
        /// <summary>
        /// 标签
        /// </summary>
        [Required]
        [DisplayName("显示文本")]
        public string Label { get; set; } = "";
        /// <summary>
        /// 类型,从ControlTypeEnum枚举取值
        /// </summary>
        [Required]
        [DisplayName("类型")]
        public ControlTypeEnum Type { get; set; }
        /// <summary>
        /// 是否必需
        /// </summary>
        [DisplayName("是否必填")]
        public bool IsRequired { get; set; }

        [DisplayName("排序")]
        [Range(1, 30)]
        public int ORDERBY { get; set; }
    }
}
